package com.example.eventbus.configuration;

import com.google.common.eventbus.AsyncEventBus;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executors;

/**
 * @author 谢汉冰
 * @Title: EventBusConfiguration
 * @Package com.example.eventbus.configuration
 * @date 2023/10/23 15:56
 * @description:
 */
@Configuration
@SuppressWarnings("all")
public class EventBusConfiguration {

	@Bean
	public AsyncEventBus asyncEventBus() {
		return new AsyncEventBus(Executors.newFixedThreadPool(10));
	}
}
